import Vue from "vue";
import VueRouter from "vue-router";
// import Home from "../views/Home.vue";

Vue.use(VueRouter);


//配置路由
const routes = [
  {
    path: "/home",
    name: "Home",
    component: ()=> import('../views/Home.vue')
  },
  {
    path: "/",
    redirect:"/home"
  },
  {
    path: "/group",
    name: "group",
    component: ()=> import('../views/Group.vue')
  },
  {
    path: "/list",
    name: "list",
    component: ()=> import('../views/List.vue')
  },
  {
    path: "/cart",
    name: "cart",
    component: ()=> import('../views/Cart.vue')
  },
  {
    path: "/mine",
    name: "mine",
    component: ()=> import('../views/Mine.vue')
  },
  {
    path: "/reg",
    name: "reg",
    component: ()=> import('../views/Reg.vue')
  },{
    path: "/login",
    name: "login",
    component: ()=> import('../views/Login.vue')
  },

];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes
});

export default router;
